<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>后台-订单管理</title>
    <link rel="icon" type="image/png" sizes="16x16" href="../../static/icons/favicon.svg">
    <script src="../../static/jQuery.js"></script>
    <link rel="stylesheet" href="../../static/admin/css/nav.css">
    <link rel="stylesheet" href="../../static/admin/css/item.css">
    <link rel="stylesheet" href="../../static/admin/css/order.css">

    <script src="../../static/admin/js/nav.js"></script>
    <script src="../../static/admin/js/order.js"></script>

</head>
<body>
<div class="tz_content">
    <!--左侧导航栏 start-->
    <div class="t_left">
        <div class="l_logo"></div>
        <div class="l_nav">
            <ul>
                <li>
                    <a href="{{ url_for('admin.index') }}">
                        <img src="../../static/icons/home(white).svg"
                             style="width: 20px;height:20px;vertical-align: text-bottom;">
                        <span>首页</span>
                    </a>
                </li>
                <li>
                    <a href="{{ url_for('admin.item_view') }}">
                        <img src="../../static/icons/item_list.svg"
                             style="width: 20px;height:20px;vertical-align: text-bottom;">
                        <span>商品列表</span>
                    </a>
                </li>

                <li class="active">
                    <a href="{{ url_for('admin.order') }}">
                        <img src="../../static/icons/order_list.svg" style="width: 20px;height:20px;vertical-align: text-bottom;">
                        <span>订单列表</span>
                    </a>
                </li>
                <li>
                    <a href="{{ url_for('admin.user') }}">
                        <img src="../../static/icons/user_list.svg" style="width: 20px;height:20px;vertical-align: text-bottom;">
                        <span>用户列表</span>
                    </a>
                </li>
            </ul>
        </div>
    </div>
    <!--左侧导航栏 end-->

    <!--头部导航栏 start-->
    <div class="t_header">
        <!--h_nav start-->
        <div class="h_nav">
            <h2>网上书城后台管理</h2>
        </div>
        <!--end h_nav-->

        <!--h_info start-->
        <div class="h_info">
            <div class="h_user">当前用户：
                {% if admin %}
                <a href="javascript:;" class="logout h_out" style="line-height: 30px;text-align: center;color: #fff;">
                    {{ admin.name }}
                </a>
                {% endif %}
            </div>
        </div>
        <!--end h_info-->

    </div>
    <!--头部导航栏 end -->

    <!--内容区域 start-->

    <div class="items">
        <div class="search">
<!--            <a href="javascript:;"><span class="add-btn">添加商品</span></a>-->
            <a href="javascript:;"><span class="clear-btn">清空搜索</span></a>
            {% with messages = get_flashed_messages() %}
            {% if messages %}
            {% for message in messages %}
            <span style="color: red">提示：{{ message }}</span>
            {% endfor %}
            {% endif %}
            {% endwith %}
            <input type="text" class="search-ipt" placeholder="输入书名">
            <img class="search-icon" style="width: 20px;height: 20px;" src="../../static/icons/search.svg">
        </div>

        <ul class="list">
            {% for user in users %}
            <span class="user"><span class="s">用户</span>&nbsp;&nbsp;{{user.name}}&nbsp;&nbsp;<span class="s">的订单</span></span>
            {% for order in orders %}
            {% if user.id == order.user.id %}
            <li data-book_id="{{order.book.book_id}}" data-order_id='{{ order.item_id }}'>
                <span class="book_name">{{order.book.book_name}}</span>
                <span class="book_author">作者：{{order.book.book_author}}</span>
                <span class="number">数量：{{order.number}}</span>
<!--                <a href="javascript:;" class="delete-btn">删除</a>-->
                <a href="javascript:;" class="detail-btn">详情</a>
            </li>
            {% endif %}
            {% endfor %}
            {% endfor %}
        </ul>

    </div>
    <!--内容区域 end-->


</div>

<!--详情商品对话框-->
<div class="mask2" style="display: none" data-book="">
    <!--    <div class="upd-item">-->
    <div class="detail-item">
        <h3 style="margin-bottom: 10px">商品详情</h3>
        <div class="user_name"></div>

        <div class="book_name"></div>
        <div class="book_author"></div>
        <div class="item_number"></div>
        <div class="is_pay"></div>
        <a href="javascript:;" class="det-n"><input type="button" value="取消"></a>
    </div>
    <!--    </div>-->
</div>
<!--详情商品对话框-->

</body>
</html>




